import sys

import pygame
from pygame.locals import *

import game
from constant import *

pygame.init()
surface = pygame.display.set_mode(SCREEN_SIZE)
pygame.display.set_caption(TITLE)

game = game.Game(surface)

while True:
    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()
        if event.type == pygame.MOUSEBUTTONDOWN:
            game.mouse_down()
    game.draw_background()
    game.draw_card()
    game.plant_grow()
    game.zombie_move()
    game.summons_move()
    pygame.display.update()